<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        Car.prototype.name = "Benz"
        function Car() {
        }
        var car = new Car();
        Car.prototype = {
            name: "Mazda"
        };
        console.log(car);
        var car2 = new Car()
        console.log(car2)
        // function Car() {
        //     var this = {
        //         __proto__: Car.prototype = {
        //             name: "Benz"
        //         }
        //     }
        // }
        s++
        console.log(s)
    </script>
</body>

</html>